package cn.hznc.vo;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @Author：Administrator
 * @Date：2023/4/22 17:06
 */
@Getter
@Setter
public class ToolDemandPredictionVo{

    private Integer id;

    private Integer employeeId;

    private String employeeName;

    /**
     * 刀具号
     */
    private String toolCode;

    /**
     * 生产订单编号
     */
    private String taskId;

    /**
     * 工序名称
     */
    private String processCraftName;

    /**
     * 刀具型号
     */
    private String toolModel;

    /**
     * 状态
     */
    private String status;

    /**
     * 刀柄型号
     */
    private String shankModel;

    /**
     * 子程序名称
     */
    private String subProgramName;

    /**
     * 加工位置id
     */
    private Integer machineToolId;

    /**
     * 加工位置名称
     */
    private String machineToolName;

    /**
     * 刀具预期数量
     */
    private Integer predictionNumber;

    @JSONField(format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date createTime;

    @JSONField(format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date finishTime;

    private Integer seq;
    //  /加工数量 = 产品加工时长
    private BigDecimal handleTime;
    // 程序加工时长
    private BigDecimal singleTime;

    private String materialNo;

    private String productionNum;

    private List<Integer> locationId;

    private List<String> locationName;

    private Integer number;

    private Integer count;

    private Double countTime;

    private Double Life;

    private Integer machineToolExistNumber;

    private Double machineToolExistLife;

    private Integer backupNumber;

    private Double backupLife;

    private Double backupTimeUsage;

    private BigDecimal extension;

    private List<String> subprograms;

    private String groupId;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ToolDemandPredictionVo that = (ToolDemandPredictionVo) o;

        if (!id.equals(that.id)) return false;
        return toolCode.equals(that.toolCode);
    }

    @Override
    public int hashCode() {
        int result = id.hashCode();
        result = 31 * result + toolCode.hashCode();
        return result;
    }
}
